package com.example.design_pattern.visitor;

public class Client {

    public static void main(String[] args){
        Client client = new Client();
        client.test();
    }

    private void test(){
        Visitor visitor = new PriceVisitor();
        /*Pc pc = new Pc();
        pc.accept(visitor);
        System.out.println(((PriceVisitor) visitor).retrieveTotalPrice());
        System.out.println(pc.price());*/

        IntegratedBoard integratedBoard = new IntegratedBoard();
        integratedBoard.accept(visitor);
        System.out.println(((PriceVisitor) visitor).retrieveTotalPrice());
        System.out.println(integratedBoard.price());
    }

}
